import request from '@/utils/request';

// 获取航段信息
export async function queryHdInfo(params) {
  return request('/dp/sys/getSegment', {
    method: 'get',
    params
  });
}

// 提交赔付单信息
export async function submitCompensation(params) {
  return request('/dp/sys/saveOrderInfo', {
    method: 'POST',
    data: { ...params, method: 'post' },
  });
}

// 获取旅客列表
export async function queryPassengerList(params) {
  return request('/dp/sys/getServiceOrderInfo', {
    method: 'get',
    params,
  })
}

// 获取下拉库数据，到达航站和出发航站的
export async function queryCityInfo(params) {
  return request('/dp/sys/getSelectCityInfo', {
    method: 'get',
    params,
  })
}

// 根据航班信息获取所有赔付单信息
export async function queryCompensationData(params) {
  return request('/dp/sys/getOrderInfoByFlightINoAndFlightDate', {
    method: 'get',
    params,
  })
}

// 关闭补偿单
export async function closeCompensation(data) {
  return request('/dp/sys/updateOrderStatus', {
    method: 'POST',
    params: data,
  })
}

// 审核接口
export async function getOrderAuditRecord(params) {
  return request('/dp/sys/getOrderAuditRecord', {
    method: 'get',
    params
  })
}

// 获取维护现场时间数据
export async function getOrderSceneList(params) {
  return request('/dp/sys/getOrderSceneList', {
    method: 'get',
    params
  })
}

// 保存维护现场时间数据
export async function saveOrderScene(params) {
  return request('/dp/sys/saveOrderScene', {
    method: 'post',
    params
  })
}